-- GENERATED SPELL FOR [Skeletal Berserker] --


function spell0_10391(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10391', 610, 1)
end

function spell1_10391(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_10391', 30304, 1)
end

function spell2_10391(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10391', 10298, 1)
end

function spell3_10391(pUnit, Event) --@Pummel,n/a--
pUnit:FullCastSpellOnTarget(12555,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10391', 5325, 1)
end

function spell4_10391(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10391', 532, 1)
end

function Sorts_10391(pUnit, Event)
local choix_sorts_10391 = math.random(0, 4)
if choix_sorts_10391 == 0 then
pUnit:RegisterEvent('spell0_10391', 1, 1)
end
if choix_sorts_10391 == 1 then
pUnit:RegisterEvent('spell1_10391', 1, 1)
end
if choix_sorts_10391 == 2 then
pUnit:RegisterEvent('spell2_10391', 1, 1)
end
if choix_sorts_10391 == 3 then
pUnit:RegisterEvent('spell3_10391', 1, 1)
end
if choix_sorts_10391 == 4 then
pUnit:RegisterEvent('spell4_10391', 1, 1)
end
end

function mob10391_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10391', math.random(1500, 3000), 1)
end

function mob10391_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10391_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10391_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10391, 1, 'mob10391_Action')
RegisterUnitEvent(10391, 2, 'mob10391_Leave')
RegisterUnitEvent(10391, 3, 'mob10391_Kill')
RegisterUnitEvent(10391, 4, 'mob10391_Die')
